package com.kaki.mdb;

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;

/**
 * @author Kaki Nakajima
 * @description DB Show 文本域通用监听器
 * @date 2024-09-17 09:11
 */
public class DBShowPlainDocument extends PlainDocument {
    private String areaText;

    public DBShowPlainDocument(String areaText){
        this.areaText = areaText;
    }

    public String getAreaText(){
        return areaText;
    }

    public void setAreaText(String areaText){
        this.areaText = areaText;
    }

    @Override
    public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
        System.out.println("insertString====> "+areaText);
        super.insertString(offs, str, a);
    }
}
